<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <head th:replace="common/head"/>
</head>
<body>
<div class="x-body">
    <form class="layui-form" style="padding-bottom: 10px;text-align: left;">
        查询角色名称：
        <div class="layui-inline">
            <input class="layui-input" type="text" name="roleName" autocomplete="on" placeholder="查询字段值">
        </div>
        <button class="layui-btn" lay-submit lay-filter="search"><i class="layui-icon">&#xe615;</i></button>
    </form>

    <xblock>
        <button class="layui-btn dialog" data-url="/sysRole/toAdd" data-title="添加">
            <i class="layui-icon">&#xe608;</i>添加
        </button>
    </xblock>

    <input type="hidden" id="editText" value="sysRole/editText">
    <input type="hidden" id="myEntityId" value="roleId">

    <table class="layui-table"
           lay-data="{url:'/sysRole/list', page:true,id:'table',limit:15,limits:[10,15,20,50,100]}"
           lay-filter="table">
        <thead>
        <tr>
            <!--<th lay-data="{field:'demo',align:'center', sort: true, edit:'text',templet:'#templetId'}">demo</th>-->
            <!--<th lay-data="{checkbox:true, fixed: true}"></th>-->

            <th lay-data="{field:'roleId',align:'center', sort: true}">roleId</th>
            <th lay-data="{field:'roleName',align:'center', edit:'text'}">角色名称</th>
            <th lay-data="{field:'roleSign',align:'center', edit:'text',verify:'checkStr'}">角色标识</th>
            <th lay-data="{field:'remark',align:'center', edit:'text'}">备注</th>
            <th lay-data="{field:'userIdCreate',align:'center', sort: true}">创建用户id</th>
            <th lay-data="{field:'createTime',align:'center', sort: true}">创建时间</th>
            <th lay-data="{fixed:'right', align:'center',width:200, toolbar: '#row-bar'}">操作</th>
        </tr>
        </thead>
    </table>

    <script type="text/html" id="row-bar">
        <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit" data-id="roleId" data-url="/sysRole/toRoleMenu" data-title="菜单权限" data-width="450"
           data-height="600"><i class="layui-icon">&#xe642;</i> 菜单权限</a>
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del" data-url='/sysRole/delete'><i
                class="layui-icon">&#xe640;</i> 删除</a>
    </script>
</div>
<div th:replace="common/js"></div>
<div th:replace="common/setting"></div>
<script type="text/javascript">
    layui.use('xtable');
</script>
</body>
</html>
